﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <title>Create</title>
    <script src="../../Scripts/PageCreater/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/PageCreater/Scripts/PageCreater.js" type="text/javascript"></script>
    <link href="../../Scripts/PageCreater/Css/Style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(document).ready(function () {
            var str = "Name,课程名,false,text,notnull,"
                        + "IsActive,状态,false,select|激活!true|注销!false,notnull,"
                        + "Opreate,操作,false,null,null";
            CreatePageFram(str);
        })

        function SubmitPage() {
            if (!InitValidator()) {
                return false;
            }
            $.ajax({
                type: "POST",
                url: "/Course/Create",
                data: { Name: function () { return $("#Name").val() }, Account: function () { return $("#User").val() }, IsActive: function () { return $("#IsActive").val() } },
                success: function () {
                    alert("创建成功！");
                    window.location = "/Course/Index";
                }
            });
        }
    </script>
</head>
<body>
    <div class="Content">
        <p>
            @Html.ActionLink("返回列表", "Index")
        </p>
        <form id="Info" method="post">
        <fieldset>
            <legend>请输入基本信息</legend>
            <div id="divContent">
            </div>
            <div>
                &nbsp;负责人&nbsp;<select id="User">
                    @{
                        foreach (ZDSoft.QLMS.Entity.SystemSetting.User user in (IList<ZDSoft.QLMS.Entity.SystemSetting.User>)TempData["Users"])
                        {
                        <option value= "@user.Account">@user.Account</option>;
                        }
                    }
                </select>
            </div>
        </fieldset>
        <p>
            <input id="btnSubmit" type="button" value="保存" class="btn3" onclick="SubmitPage()" />
        </p>
        </form>
    </div>
</body>
</html>
